import {Config} from "wxconfig.js";

class Token {

  constructor (){
    this.tokenUrl = Config.url + '/getToken'
    this.verifyUrl = Config.url + '/veirfyToken'
  }

  // 验证token
  verify (){
    var token = wx.getStorageInfoSync('token');
    if(!token){
      this.getTokenFromServer();
    }else{
      this._veirfyFromServer();
    }
  }

  // 从服务器获取生成token
  getTokenFromServer(){
    var t = this;
    
  }

  // 去服务器检验令牌
  _veirfyFromServer (){

  }

}

export {Token};